With the development of communications technologies, more applications appear on a terminal device. For example, an application on a smartphone, especially on some application clients related to the mobile Internet, including Instant Messenger (IM), Email, social networking service (SNS), and the like, needs to communicate, in real time, with a server on a network side or an application client on another smartphone.
At present, a manner used to implement this type of real-time communication is based on a client/server (C/S) service operation mode of a fixed network and a personal computer (PC), this type of real-time communication is implemented in a manner in which the PC fixedly accesses the Internet. In an entire service deployment process, a mobile communications network between a smartphone and an application server is used as a connection channel, and transparency processing is performed on an application for the mobile network, so that the server does not perceive a difference between a mobile terminal and a fixed terminal.
A mobile terminal needs to always maintain an Internet Protocol (IP) connection, that is, being similar to a fixed network, the mobile terminal is always ready to receive and send a data packet. Meanwhile, in a process in which an application program runs on the mobile terminal, heartbeat signaling is sent between the terminal and a server at a smaller time interval, so as to ensure constant refreshing of information about a peer end. This mechanism is used to maintain a valid IP connection for a long period, so that all service data is sent over this IP connection.
When no data is sent over a Packet Data Protocol (PDP) connection of the mobile terminal for a period of time, the PDP connection is released; however, when data is to be sent, the PDP connection needs to be re-established. In this way, a large number of terminals continually perform processes of PDP connection establishment and release to send the foregoing heartbeat signaling, thereby resulting in a so-called signaling storm that seriously consumes wireless communications resources of a mobile communications network.
At present, the industry proposes a push (Push) solution to solve a signaling storm problem. By means of setting a specific proxy server on a network side, for example, an always online infrastructure (AOI) server or a Push server, and setting a specific application proxy client on a terminal, for example, AOI middleware or a Push client, an IP connection between an application client such as IM, Email, and SNS on the terminal and an associated application server is replaced with a maintenance connection between the application proxy client on the terminal and the proxy server on the network side and a maintenance connection between the proxy server and the application server, so that information communication between the application client and the associated application server is implemented by using the connection between the application proxy client and the proxy server. Therefore, the application client on the terminal and the associated application server do not need to constantly send heartbeat signaling to maintain the IP connection, which avoids continual establishment and release processes of a PDP connection of the terminal and eases a network burden.
Some abnormal conditions may occur to an application proxy client on a terminal in a using process, for example, a user may uninstall the application proxy client from a mobile phone, or a connection between the application proxy client and a proxy server fails to be established because the mobile phone is powered off for a long period or out of service. For ease of description, That AOI middleware is used as an application proxy client and an AOI server is used as an application server for description in the following. A person skilled in the art should understand that, specific implementation manners of the application proxy client and the application server are not limited to the AOI middleware and the AOI server.
At present, in the industry, a method for detecting an abnormal condition such as uninstalling the AOI middleware from a terminal is as follows.
The AOI server sends a wakeup short message to the terminal when detecting an abnormal connection of the terminal; the AOI server resends the wakeup short message to the terminal if the terminal is not connected to the AOI server after time T1; the AOI server has resent the wakeup short message to the terminal for N1 times but the terminal is not connected to the AOI server; the AOI server adjusts a status of the terminal as offline; and in this status, if a certain application server wants to push a service message to the terminal through the AOI server, the AOI server returns a push failure message to the application server, where a failure cause is that the terminal is offline; and, if the terminal is still not connected to the AOI server after time T2, the AOI server determines that the user may have uninstalled middleware, and adjusts the status as that the middleware has been uninstalled; and in this status, if a certain application server wants to push a service message to the terminal through the AOI server, the AOI server returns a push failure message to the application server, where a failure cause is that the middleware is uninstalled, and the application server does not attempt to push the service message to the user after receiving this type of failure cause.
In an existing procedure, the AOI server can determine, only according to a specific operation, whether the terminal has deleted the AOI middleware. As a result, the AOI server cannot learn an accessible status of the terminal, thereby affecting quality of service of the application server; in addition, in the existing procedure, the terminal cannot learn, for example, the following information: The AOI server has considered that the AOI middleware is deleted from the terminal, information about the terminal has been deleted from the AOI server, and which application server has considered that the AOI middleware is deleted from the terminal, and the like. Acquiring the foregoing information can further improve processing efficiency among the terminal, the AOI server, and the application server, save a network resource, and improve quality of service of a related application client on the terminal. Therefore, in this field, a method for processing an abnormality of AOI middleware needs to be further improved.